namespace Chaotic.DataBase.DBAccessLibrary.Model;

[Serializable]
public class ServerEntity : DataBaseEntity
{
	public ServerEntity(string? name)
		: base(name)
	{
		base.ImageUrl = "/Images/Tree/server.png";
	}

	public override DataBaseEntity? Copy()
	{
		ServerEntity? serverEntity = new ServerEntity(base.Name);
		serverEntity.IsExpanded = base.IsExpanded;
		serverEntity.IsSelected = base.IsSelected;
		ServerEntity? serverEntity2 = serverEntity;
		Copy(serverEntity2);
		if (base.ChildNodes.Count > 0)
		{
			DataBaseEntity?[] array = base.ChildNodes.ToArray();
			foreach (DataBaseEntity? dataBaseEntity in array)
			{
				DataBaseEntity? dataBaseEntity2 = dataBaseEntity.Copy();
				if (dataBaseEntity2 != null)
				{
					serverEntity2.ChildNodes.Add(dataBaseEntity.Copy());
				}
			}
			return serverEntity2;
		}
		return null;
	}
}
